/**
 * $Id: BookRepositoryImpl.java 19 2011-06-11 04:06:06Z feigme $
 */
package com.iary.infrastructure.orm.hibernate;

import org.springframework.stereotype.Repository;

import com.iary.domain.model.book.Book;
import com.iary.domain.model.book.BookRepository;

@Repository
public class BookRepositoryImpl extends HibernateDao<Book, Long> implements
		BookRepository {

	public Book findBookByName(String name) {
		return (Book) getSession().createQuery("from Book where name = :name")
				.setParameter("name", name).uniqueResult();
	}
}
